package cn.edu.hgu.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.edu.hgu.bean.AdminInfo;
import cn.edu.hgu.bean.AdminRoleInfo;
import cn.edu.hgu.dao.AdminDao;
import cn.edu.hgu.dao.AdminRoleDao;
import cn.edu.hgu.service.AdminService;
import cn.edu.hgu.util.PageResult;

@Service("adminService")
public class AdminServiceImpl implements AdminService{
	
	@Resource(name="adminDao")
	private AdminDao adminDao;
	@Resource(name="adminRoleDao")
	private AdminRoleDao adminRoleDao;

	public void setAdminDao(AdminDao adminDao) {
		this.adminDao = adminDao;
	}
	
	public void setAdminRoleDao(AdminRoleDao adminRoleDao) {
		this.adminRoleDao = adminRoleDao;
	}

	public PageResult<AdminInfo> findByPage(String condition, PageResult<AdminInfo> pageResult, List<Object> params) {
		return adminDao.findByPage(condition, pageResult, params);
	}

	public List<AdminRoleInfo> findAdminRole() {
		return adminRoleDao.findAll();
	}
	
}
